Overview
Duet enables instant pair programming through SSH. Connect to the server, create or join a room, and start collaborating with your team in seconds—no additional setup required.Creating a session
When you connect to Duet via SSH, you’ll see the launch screen with two options:1
Connect to the Duet server
2
Select 'Create room'
Navigate using arrow keys or press
c to create a new room.3
Add an optional description
Enter a description like “Backend refactoring” or “Bug fix session”. This generates a readable workspace name (e.g.,
backend-refactoring).If you skip the description, Duet generates a random name like
cosmic-phoenix4
Share the room ID
After creation, you’ll see a screen with your unique room ID (UUID format). Share this with your pair programming partner.
5
Press Enter to start
You’ll be taken to the collaborative terminal where you can start working.
Joining a session
To join an existing session:1
Connect via SSH
2
Select 'Join room'
Press
j or navigate to “Join room” and press Enter.3
Enter the room ID
Paste the UUID you received from the session host:
4
Start collaborating
You’ll immediately see the shared terminal and any existing chat history.
Session architecture
Under the hood, Duet rooms are managed by theroom.Manager which coordinates:
- Client registration: Each connection creates a
Clientwith a unique ID and username - Event broadcasting: All participants receive real-time events (joins, leaves, typing indicators)
- Workspace isolation: Each room gets its own directory at
/app/workspaces/{workspace-name} - Resource cleanup: When the last participant leaves, the workspace and all resources are destroyed
Real-time presence
Duet keeps everyone informed about session activity:Join notifications
When someone joins, all participants see:
Leave notifications
When someone disconnects:
Typing indicators
See who’s actively typing in the terminal (debounced to 500ms)
User list
The sidebar shows all connected users with their roles:
alice (host) (you)bob
Keyboard shortcuts
- Launch screen
- Room screen
Session lifecycle
Error handling
Rooms are ephemeral—they only exist while at least one participant is connected. If everyone leaves, the room and its workspace are permanently deleted.
Next steps
Shared terminal
Learn how the real-time terminal synchronization works
AI assistant
Use AI to help with your pair programming session